﻿using System;
using System.Collections.Generic;
using System.Text;
using XDesigner.ORM;

namespace XDesigner.AppFramework.DOM
{
    [ORMType("Table_Department")]
    public class AppDepartment
    {
        private int _RecordID = 0;
        [ORMKeyField()]
        public virtual int RecordID
        {
            get { return _RecordID; }
            set { _RecordID = value; }
        }

        private string _Name = null;

        public virtual string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        private string _Description = null;

        public virtual string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

        private bool _Enabled = true;
        [System.ComponentModel.DefaultValue( true )]
        public virtual bool Enabled
        {
            get { return _Enabled; }
            set { _Enabled = value; }
        }

        private List<AppUser> _Users = null;
        [ORMRelation( ORMRelationStyle.OneToMany )]
        [ORMDelay()]
        public virtual  List<AppUser> Users
        {
            get { return _Users; }
            set { _Users = value; }
        }
    }
}
